<?php echo $header;echo $sidebar ?>
		
		<div class="span10 content">
			<?php echo $hugemenu ?>

            <h1><?php echo $title; ?></h1>
            <?php if ($message) { ?>
                <div class="alert alert-error">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $message; ?>
                </div>
            <?php } if ($success) { ?>
                <div class="alert alert-success">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $success; ?>
                </div>
            <?php } ?>
            <!--div class="alert alert-info"><?php echo lang('hrm_booking_add_message'); ?></div-->
		
<link rel="stylesheet" href="<?php echo base_url() ?>assets/admin/css/jquery-ui.css">
<link rel="stylesheet" href="<?php echo base_url() ?>assets/admin/css/jquery-ui-timepicker-addon.css">
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-ui-timepicker-addon.js"></script>
	<script>
		  $(function() {
		  
			$("#sdate").datetimepicker( {
				dateFormat:"yy-mm-dd"
			});
			 $("#edate").datetimepicker({
				dateFormat:"yy-mm-dd"
			});
		  });
		  </script>

			<div class="contentArea">
				<div class="widget">
					<div class="widget-head"><h3 class="heading"><?php echo $sub_title ?></h3></div>
					<?php echo form_open_multipart(current_url(), array('class' => 'form-horizontal')); ?>
                                        <div class="widget-body">
                                            <div class="row-fluid">
                                                <div class="span6">
                                                    <div class="control-group">
                                                        <label class="control-label"><?php echo lang('hrm_sidemenu_timesheet_add_form_field_starttime', 'Start Date'); ?></label>
                                                        <div class="controls">
                                                            <?php
                                                                  $txtsdate = array(
                                                                    'name'        => 'sdate',
                                                                    'id'          => 'sdate',
                                                                    'value'       => ($fill_data->id? $fill_data->start_time : set_value('sdate')),
                                                                    'maxlength'   => '20',
                                                                    'size'        => '20',
                                                                    'class'       => 'span12',
                                                                  );
                                                                  echo form_input($txtsdate); ?> 

                                                        </div>
							<br>
							<label class="control-label"><?php echo lang('hrm_sidemenu_timesheet_add_form_field_endtime', 'End Date'); ?></label>
							<div class="controls">
                                                            <?php
                                                                  $txtedate = array(
                                                                    'name'        => 'edate',
                                                                    'id'          => 'edate',
                                                                    'value'       => ($fill_data->id? $fill_data->end_time : set_value('edate')),
                                                                    'maxlength'   => '20',
                                                                    'size'        => '20',
                                                                    'class'       => 'span12',
                                                                  );
                                                                  echo form_input($txtedate); ?> 
                                                        </div>
                                                        <br>
							
							
							<label class="control-label"><?php echo "Apartment"; ?></label>
                                                        <div class="controls">
                                                            <?php
														
                                                                    $options = array();

                                                                    foreach ($this->data['customerlist'] as $user): 
                                                                        $options[$user->id] = $user->name;
                                                                    endforeach;
                                                                    
                                                                    $value = ($fill_data->id? $fill_data->customerid : set_value('customerid'));
                                                                    
                                                                    echo form_dropdown('customerid', $options, $value);
                                                                    ?>
                                                        </div>
							<br>
							
							<label class="control-label"><?php echo "Availability"; ?></label>
                                                        <div class="controls">
                                                            <?php
														
                                                                    $options = array();

                                                                    foreach ($this->data['availabilitylist'] as $availability): 
                                                                        $options[$availability->id] = $availability->name;
                                                                    endforeach;
                                                                    
                                                                    $value = ($fill_data->id? $fill_data->customerid : set_value('customerid'));
                                                                    
                                                                    echo form_dropdown('availability', $options, $value);
                                                                    ?>
                                                        </div>
                             <br>
							 
							<label class="control-label"><?php echo lang('booking_sidemnu_add_form_field_price', 'Price'); ?></label>
                                 <div class="controls">
                                   <?php
                                                                     $txtNote = array(
                                                                          'name'        => 'Price',
                                                                          'id'          => 'Price',
                                                                          'value'       => ($fill_data->id? $fill_data->Person : set_value('Price')),
                                                                          'class'       => 'span12',
                                                                        );
                                   ?>
                                  <?php echo form_input($txtNote); ?> 
                                                        </div><br>
							
                                                     </div>
                                                    <div class="control-group">
                                                        <label class="control-label"></label>
                                                        <div class="controls">
                                                            <?php echo form_submit('submit',($name['value']) ? lang('booking_sidemnu_add_availability_form_field_submit') : lang('booking_sidemnu_add_availability_form_field_submit'), 'class="btn btn-info span6"'); ?>
                                                        </div>
                                                    </div>          
                                                </div>
                                            </div>
                                        </div>
                                        <input type="hidden" name="id" id="id" value="<?php echo ($fill_data->id? $fill_data->id : 0 );?>"/>
					<?php echo form_close(); ?>	

				</div>

			</div>
			

        </div>
        <!--/content-->

<?php echo $footer ?>